package com.ym.medical.domain.param;

import com.ym.common.constant.BeanCovert;
import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;
import com.ym.medical.domain.entity.UserLikeRecordEntity;
import com.ym.common.annotations.CustomConstraint;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.ym.medical.enums.CommentTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;

/**
 * 用户点赞对象 user_like_record
 *
 * @author ym
 * @date 2020-08-24
 */
@ApiModel("用户点赞-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserLikeRecordUpdateParam extends BeanCovert<UserLikeRecordEntity>{

    @ApiModelProperty("主键")
    @NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
    private Long id;

    @ApiModelProperty("板块")
    @NotEmpty(message = "板块不能为空", groups = {Add.class, Update.class})
    @Size(max = 2, message = "板块长度超过{max}", groups = {Add.class, Update.class})
    @CustomConstraint(CommentTypeEnum.class)
    private String plate;

    @ApiModelProperty("相关记录ID")
    @NotNull(message = "相关记录ID不能为空", groups = {Add.class, Update.class})
    private Long recordId;

    @ApiModelProperty("点赞人")
    @NotNull(message = "点赞人不能为空", groups = {Add.class, Update.class})
    private Long upPerson;

    @ApiModelProperty("创建时间")
    @NotNull(message = "创建时间不能为空", groups = {Add.class, Update.class})
    private Date creTime;

}
